import * as types from './mutations_types';

module.exports = {
	show_loading: ({
		commit
	}) => {
		return new Promise((resolve, reject) => {
			commit(types.SHOW_LOADING);
			resolve()
		});
	},

	hide_loading: ({
		commit
	}) => {
		return new Promise((resolve, reject) => {
			commit(types.HIDE_LOADING);
			resolve()
		});
	},

	update_new_orders: ({
		commit
	}, total) => {
		return new Promise((resolve, reject) => {
			commit(types.UPDATE_NEW_ORDERS, total);
			resolve();
		})
	},

	update_empty_barrel_orders: ({
		commit
	}, total) => {
		return new Promise((resolve, reject) => {
			commit(types.UPDATE_EMPTY_BARREL_ORDERS, total);
			resolve();
		})
	},

	update_deposite_orders: ({
		commit
	}, total) => {
		return new Promise((resolve, reject) => {
			commit(types.UPDATE_DEPOSITE_ORDERS, total);
			resolve();
		})
	}
};